package cn.wen.yinxiu.system.controller;

import java.util.Arrays;
import java.util.Map;

import cn.wen.yinxiu.common.convention.errorcode.ErrorCode;
import cn.wen.yinxiu.common.convention.exception.ServiceException;
import cn.wen.yinxiu.common.convention.result.Results;
import cn.wen.yinxiu.system.entity.CloudConfigEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import cn.wen.yinxiu.system.entity.SysConfigEntity;
import cn.wen.yinxiu.system.service.SysConfigService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.common.convention.result.ResultEntity;

/**
 *
 * @ClassName: SysConfigController
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-22 09:46:50
 * @Description: 系统配置表的Controller层
 */
@RestController
@RequestMapping("system")
public class SysConfigController {

    @Autowired
    private SysConfigService sysConfigService;

    /**
     * 获取当前选择的云存储方式
     *
     * @return
     */
    @GetMapping("/config/cloud")
    public ResultEntity<CloudConfigEntity> getConfigCloudInfo() {
        CloudConfigEntity res = sysConfigService.getConfigCloudInfo();
        return Results.success(res);
    }

}
